﻿CMAKE_MINIMUM_REQUIRED(VERSION 3.1)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
    include_directories(${PROJECT_ROOT}/3rdparty/jsoncpp/include)
    function(add_json_example name src)
        add_executable(${name}
            ${src}
			any.hpp
            )
        target_link_libraries(${name} ValiJSON::valijson jsoncpp_static)
        INSTALL(TARGETS ${name}  
                ARCHIVE DESTINATION lib
                RUNTIME DESTINATION bin)
    endfunction()

    #add_json_example(custom_schema custom_schema.cpp)
    add_json_example(external_schema external_schema.cpp)
    #add_json_example(array_iteration_basics array_iteration_basics.cpp)
    #add_json_example(array_iteration_template_fn array_iteration_template_fn.cpp)
    #add_json_example(object_iteration object_iteration.cpp)
    #add_json_example(json_pointers json_pointers.cpp)
    #add_json_example(remote_resolution_local_file remote_resolution_local_file.cpp)
    #add_json_example(valijson_nlohmann_bundled_test valijson_nlohmann_bundled_test.cpp)

    #target_link_libraries(custom_schema ${Boost_LIBRARIES})
    #target_link_libraries(external_schema ${Boost_LIBRARIES})
    #target_link_libraries(array_iteration_basics jsoncpp)
    #target_link_libraries(array_iteration_template_fn ${JSONCPP_LIBS})
    #target_link_libraries(object_iteration ${JSONCPP_LIBS})
    #target_link_libraries(json_pointers)



